package com.zq.behavior.observer;

import java.util.Objects;

public class Client {
    private static void invoke(Subject subject) {
        Objects.requireNonNull(subject);
        subject.notifyAllObservers(1314);
    }

    public static void main(String[] args) {
        Subject subject = new ConcreteSubject();
        subject.register(new ConcreteObserver1()).register(new ConcreteObserver2());
        invoke(subject);
    }
}
